<?php

class Application_Form_Dojoformtest extends Zend_Dojo_Form
{

    public function init()
    {
        $this->setAction('dojoformtest')
			->setMethod('post');
        
        
        // create autocomplete input for country
        $country = new Zend_Dojo_Form_Element_ComboBox('country');
        $country->setLabel('contact-country');
        $country->setOptions(array(
        		'autocomplete' => false,
        		'storeId' => 'countryStore',
        		'storeType' => 'dojo.data.ItemFileReadStore',
        		'storeParams' => array('url' => "/default/dojoformtest/getdata"),
        		'dijitParams' => array('searchAttr' => 'name')))
        		->setRequired(true)
        		->addValidator('NotEmpty', true)
        		->addFilter('HtmlEntities')
        		->addFilter('StringToLower')
        		->addFilter('StringTrim');
        

        $birthday = new Zend_Dojo_Form_Element_DateTextBox('birthday');
        $birthday->setLabel('Birthday');
        
        
        $this->addElement($country)
        ->addElement($birthday);
        
        
        
        
        
    }
    


}

